#!/bin/bash
set -e

# if [ -z "$2" ]; then
	# echo `basename $0` "<input.vcf> <out.txt>"
	# exit 1
# fi

#-----------------------------------------------
#-----------------------------------------------
. /mnt/ilustre/app/medical/tools/.var #---------
#-----------------------------------------------



echo format vcf high
${script_path}/format_all_0508.sh 1.high.vcf 1.high.txt
# ${script_path}/format_all_1028.sh 1.high.vcf 2.high.txt # for anno_0723
${script_path}/format_all_1030.sh 1.high.vcf 2.high.txt 2.high.html.txt # for anno_1030

echo format vcf low
${script_path}/format_all_0508.sh 1.low.vcf 1.low.txt 
# ${script_path}/format_all_1028.sh 1.low.vcf 2.low.txt
${script_path}/format_all_1030.sh 1.low.vcf 2.low.txt 2.low.html.txt

echo format vcf fp
${script_path}/format_all_0508.sh 1.fp.vcf 1.fp.txt 
# ${script_path}/format_all_1028.sh 1.fp.vcf 2.fp.txt
${script_path}/format_all_1030.sh 1.fp.vcf 2.fp.txt 2.fp.html.txt

echo txt2xls  
txt2xls_0427.pl 1.summary.txt 1.high.txt 1.low.txt 1.fp.txt 1.xls
txt2xls_0427.pl 1.summary.txt 2.high.txt 2.low.txt 2.fp.txt 2.xls

echo format jxl
format_jxl.sh 2.xls 2.jxl.xls
	


echo txt2html
# paste 2.index.txt 2.high.txt > 2.high.index.txt
# paste 2.index.txt 2.low.txt > 2.low.index.txt
# paste 2.index.txt 2.fp.txt > 2.fp.index.txt
snp_html.sh 1.summary.txt 1.high.txt 1.low.txt 1.fp.txt
snp_html.sh  -p2 1.summary.txt 2.high.html.txt 2.low.html.txt 2.fp.html.txt